package com.graduation.vaccine.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.graduation.vaccine.dto.DropDownBoxDTO;
import com.graduation.vaccine.dto.NearByAddressDTO;
import com.graduation.vaccine.dto.SysCompanyDTO;
import com.graduation.vaccine.dto.VaccinedAddressDTO;
import com.graduation.vaccine.pojo.Company;
import com.graduation.vaccine.vo.CompanyUnionQueryVo;
import com.graduation.vaccine.vo.NearByAddressVo;
import com.graduation.vaccine.vo.UpdateCompanyVo;
import com.graduation.vaccine.vo.VaccinedAddressVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ZhaoJunYao
 * @since 2022-04-13
 */
@Mapper
public interface CompanyMapper extends BaseMapper<Company> {

    /**
     * 获取该用户所在城市的所有有余量的该疫苗的接种点信息
     * @param vaccinedAddressVo
     * @return
     */
    List<VaccinedAddressDTO> getTotalVaccinedAddress( VaccinedAddressVo vaccinedAddressVo);

    /**
     * 获取用户附件的接种点
     * @param nearByAddressVo
     * @return
     */
    List<NearByAddressDTO> getNearByVaccinedAddress(NearByAddressVo nearByAddressVo);

    List<SysCompanyDTO> getAll();

    List<DropDownBoxDTO> companyDropDownBox();

    SysCompanyDTO getCompanyByName(String companyName);

    List<SysCompanyDTO> unionQuery(CompanyUnionQueryVo companyUnionQueryVo);

    int updateCompany(UpdateCompanyVo updateCompanyVo);

    int addOne(Company company);
}
